
{%- set default_cable = '40m' %}

{%- macro generate_buffer_pool_and_profiles() %}

    "BUFFER_POOL": {
        "ingress_lossless_pool": {
            "size": "113620296",
            "type": "ingress",
            "mode": "dynamic",
            "xoff": "50653696"
        },
        "egress_lossless_pool": {
            "size": "113620296",
            "type": "egress",
            "mode": "static"
        }
    },
    "BUFFER_PROFILE": {
        "ingress_lossy_profile": {
            "pool":"[BUFFER_POOL|ingress_lossless_pool]",
            "size":"0",
            "static_th":"113620296"
        },
        "egress_lossless_profile": {
            "pool":"[BUFFER_POOL|egress_lossless_pool]",
            "size":"0",
            "static_th":"113620296"
        },
        "egress_lossy_profile": {
            "pool":"[BUFFER_POOL|egress_lossless_pool]",
            "size":"0",
            "dynamic_th":"2"
        },
        "egress_lossy_cpu_profile": {
            "pool":"[BUFFER_POOL|egress_lossless_pool]",
            "size":"0",
            "dynamic_th":"-5"
        }
    },
{%- endmacro %}

{%- macro generate_mc_queue_buffers(PORT_ACTIVE) %}
{% for port in PORT_ACTIVE %}
       "{{ port }}|8": {
            "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
        },
       "{{ port }}|9": {
            "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
        },
       "{{ port }}|10": {
            "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
        },
       "{{ port }}|11": {
            "profile" : "[BUFFER_PROFILE|egress_lossy_profile]"
        }{% if not loop.last %},{% endif %}

{% endfor %}
{%- endmacro %}
